package com.example.pandaso.mapper;

import java.util.List;


import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;


import com.example.pandaso.pojo.User;
import com.example.pandaso.pojo.UserEngine;

@Mapper
public interface UserMapper {
  
    User findByUsername(@Param("username") String username);
  
    List<UserEngine> findEnginesByUserId(int userId);
  
    int findUserIdByuserName(@Param("username")String userName);

    int updateUserEngines(int enabled, int userId, String engineName);

    User findByUseremail(@Param("usermail") String useremail);

    Boolean addByUser(@Param("user") User user);

    int updateUserChatoutPut(String chatOutput, int userId);

    String getChatOutputByUserId(int userId);

    int updateUserPasswordByUserId(String newPassword, int userId);

    Boolean addLoginTime(int userId,String loginTime);
  
    List<String> updateLoginHistory(int userId);

    Boolean addSearch(int userId,String search);

    List<String> updateUserSearch(int userId);

    Boolean deleteUserSeach(int userId);

}
